package com.zhuifeng.orders.controller;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @description:
 * @author: 周国强
 * @time: 2022/8/23 20:47
 */
@SpringBootApplication
public class RedissonApplication {

    @Bean
    public Redisson redisson(){
        //此为单机模式
        Config config = new Config();
        config.useSingleServer().setAddress("redis://47.98.136.123:6379").setDatabase(0);
        return (Redisson) Redisson.create(config);
    }

}
